<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { getDefaultConfig } from './api/index.js'
import store from './store'

export default {
  name: 'App',
  async created() {
    const { data } = await getDefaultConfig()
    if (data && data.length > 0) {
      store.dispatch('settings/changeSetting', {
        key: 'title',
        value: data.site_title
      })
    }
  }
}
</script>
